#!/bin/bash
sudo ntfsfix /dev/nvme0n1p9
sudo umount /dev/nvme0n1p9
sudo mount /dev/nvme0n1p9
sudo ntfsfix /dev/mmcblk0p1
sudo umount /dev/mmcblk0p1
sudo mount /dev/mmcblk0p1
zenity --question --width=400 \
  --text="修复成功！需要重启才能生效！, \
\n现在是否重启?"
if [ "$?" != 0 ]; then
  #NOTE: This code will never be reached due to "set -e", the system will already exit for us but just incase keep this
  echo "bye then! xxx"
  exit 0;
fi

reboot

